home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
mac
/
Mac_Files
/
Vendor Demos
/
NeuralWare folder
/
nw2v50
/
grnn.nnc
< prev
next >
Wrap
Text File
|
1993-08-23
|
2KB
|
56 lines
csv3.8 !file format
! Nov 92 (grnn.nnc) General Regression Neural Network
!************************************************************************
!* *
!* General Regression Neural Network Control Strategy *
!* *
!************************************************************************
!
! *** Recall ***
!
!MASK label op-code operands comment
L_saR_sa trace aux3 ! set trace option to aux3
L_saR_sa cset recall,1 ! recall count
!
! Initialize ce field with 1/N
L___R_sa lset in ! input layer
L___R_sa io read ! get input data
L___R_sa @rloop math sum ! perform sum (for norm layer)
L___R_sa math rnoise|tran|output
L___R_sa lset cur,1 ! next layer
L___R_sa lcmp out ! at output layer ?
L___R_sa blt @rloop ! loop till done
L___R_sa io rcltst
L___R_sa math sum|ce=e|tran|output|e-=w|swap
L___R_sa io write ! write results
L___R_sa brct @exit ! skip to end
!
! *** Learning ***
!
L_saR___ lset in ! start at input layer
L_saR___ io lrnin ! get input data
L_saR___ @lloop math sum|fire
L_saR___ math lnoise|tran|output|learn|fire
L_saR___ lset cur,1 ! next layer
L_saR___ lcmp out,-1 ! AT summation layer ?
L_saR___ blt @lloop ! loop till done
! Following assumes ce contain 1,0,0...,0. "Divide" transfer
! function initialization should ensure this.
L_saR___ math e=ce ! ce contains 1,0,0...0
L_saR___ lset out ! Output layer
L_saR___ io lrnout ! get desired output
L_saR___ math backp|fire ! back=propagate desired
L_saR___ lset cur,-1 ! summation layer
L_saR___ math learn|fire
!
!
! Now, recall to output layer
!
L_saR___ math sum|lnoise|tran|output
L_saR___ lset cur,1 ! output layer
L_saR___ math sum|ce=e|tran|output|e-=w|swap ! final output
L_saR___ io lrnrslt ! Actual Output in learn mode
LisaRisa @exit trace 0 ! turn off any trace function